const express = require("express")

const app = express()

// 指在当前express实例上添加一个变量
app.set('secret','7tr7ee6rte676')

app.use(require('cors')())
app.use(express.json())
app.use('/uploads',express.static(__dirname + '/uploads'))


require('./plugins/db')(app)
require('./routes/admin')(app)

app.listen(3000,() => {
    console.log('http://localhost:3000')
});